import { spawn } from "child_process";
import { dirname } from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const childProcess = spawn(
  `set NODE_OPTIONS="${__dirname}/android-as-linux.js"&& node "/data/data/com.termux/files/usr/lib/code-server/out/node/entry.js" --config ${__dirname}/config.yaml`,
  { shell: true }
);
childProcess.stdout.on("data", (data) => {
  process.stdout.write(data.toString());
});
childProcess.stderr.on("data", (data) => {
  process.stderr.write(data.toString());
});
